﻿
namespace Songhay.Mvvm.Models
{
    /// <summary>
    /// Defines Prism “Event payload” for Model CRUD operations.
    /// </summary>
    /// <typeparam name="TModel">The type of the entity model.</typeparam>
    public class ModelEventPayload<TModel>
    {
        /// <summary>
        /// Gets or sets a value indicating whether this instance is delete.
        /// </summary>
        /// <value>
        ///   <c>true</c> if this instance is delete; otherwise, <c>false</c>.
        /// </value>
        public bool IsDelete { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is insert.
        /// </summary>
        /// <value>
        ///   <c>true</c> if this instance is insert; otherwise, <c>false</c>.
        /// </value>
        public bool IsInsert { get; set; }

        /// <summary>
        /// Gets or sets a value indicating whether this instance is update.
        /// </summary>
        /// <value>
        ///   <c>true</c> if this instance is update; otherwise, <c>false</c>.
        /// </value>
        public bool IsUpdate { get; set; }

        /// <summary>
        /// Gets or sets the model.
        /// </summary>
        /// <value>
        /// The model.
        /// </value>
        public TModel Model { get; set; }
    }
}
